#ifndef QMYVIDEOWIDGET_H
#define QMYVIDEOWIDGET_H

#include <QObject>
#include <QKeyEvent>
#include <QMediaPlayer>
#include <QMouseEvent>
#include <QVideoWidget>

class QmyVideoWidget : public QVideoWidget
{
    Q_OBJECT
public:
    explicit QmyVideoWidget(QWidget *parent = Q_NULLPTR);

    void setMediaPlayer(QMediaPlayer *player);

private:
    QMediaPlayer *thePlayer;

protected:
    void keyPressEvent(QKeyEvent *event);     // 键盘事件函数
    void mousePressEvent(QMouseEvent *event); // 鼠标事件函数

signals:
};

#endif // QMYVIDEOWIDGET_H
